<!-----------实名认证展示页面------------->
<template>
  <div>
    <topheader :toptitle="toptitle"/>
    <div class="wrapper">
      <div class="wrapper-inner">
        <img class="realname-bind-success" src="static/img/success2.png"/>
        <div class="realname">
          <p class="bind-tip tc mb20">您已经完成了实名认证~</p>
          <div class="des-item clearfix">
            <div class="l des-item-l">真实姓名</div>
            <p>{{realName}}</p>
          </div>
          <div class="des-item clearfix">
            <div class="l des-item-l">身份证号</div>
            <p>{{idCard}}</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>


<script>
  import topheader from '@/components/topheader'

  export default {
    name: 'identitybinded',
    components: {
      'topheader': topheader
    },
    data () {
      return {
        toptitle: "身份信息",
        realName: "",
        idCard: ""
      }
    },
    created() {
      let userInfo = userInfoKit.getUserInfo()
      if (userInfo !== null && userInfo.realName !== null && userInfo.idCard !== null) {
        this.realName = userInfo.realName.replace("/(?<=.)./g", '*')
        this.idCard = userInfo.idCard.replace("/^(.{3})(?:\d+)(.{4})$/", "$1***********$2")
      }
    }
  }
</script>

